﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections.ObjectModel;
using System.Data;

namespace StockManagement.Model
{
    public class ProductMaterial
    {
        public ProductMaterial(Guid materialID, string materialName, string materialCode)
        {
            MaterialID = materialID;
            MaterialName = materialName;
            MaterialCode = materialCode;
        }

        public ProductMaterial(DataRow row)
        {
            MaterialID = (Guid)row["MaterialID"];
            MaterialName = row["Name"].ToString();
            MaterialCode = row["MaterialCode"].ToString();
            MaterialQuantity = int.Parse(row["Quantity"].ToString());
            IsSelected = true;
        }

        public Guid MaterialID { get; private set; }
        public string MaterialName { get; private set; }
        public string MaterialCode { get; private set; }
        public int MaterialQuantity { get; set; }
        public bool IsSelected { get; set; }  
    }

    public class ProductMaterialList : List<ProductMaterial>
    { 
    }
}
